#ifndef CONFIGREADER_H_
#define CONFIGREADER_H_


#include "MessageDef.h"
#include <stdbool.h>
#include <vector>

class ConfigReader
{
public:
	ConfigReader();
	virtual ~ConfigReader();

	bool Initialize(NODE_INFO &nodeInfo, vector<NEIGBOUR_INFO> &vecNeigbInfo, int nodeId);
private:
	bool extractNodeInfo(char * nodeInfoStr, NODE_INFO &nodeInfo);
	bool extractNeighborInfo(char * nodeInfoStr, NEIGBOUR_INFO &NeigbInfo);
	string getIpAddr(int nodeId);
	int getPortNum(int nodeId);
};

#endif
